import request from '@/utils/request'

// 查询监测目标列表
export function listTarget(query) {
  return request({
    url: '/slope/target/list',
    method: 'get',
    params: query
  })
}

// 查询监测目标详细
export function getTarget(targetId) {
  return request({
    url: '/slope/target/getInfo/' + targetId,
    method: 'get'
  })
}

// 新增监测目标
export function addTarget(data) {
  return request({
    url: '/slope/target/add',
    method: 'post',
    data: data
  })
}

// 修改监测目标
export function updateTarget(data) {
  return request({
    url: '/slope/target/edit',
    method: 'post',
    data: data
  })
}

// 删除监测目标
export function delTarget(targetId) {
  return request({
    url: '/slope/target/remove/' + targetId,
    method: 'post'
  })
}

// 导出监测目标
export function exportTarget(query) {
  return request({
    url: '/slope/target/export',
    method: 'get',
    params: query
  })
}